package org.seckill.dao;

import org.apache.ibatis.annotations.Param;
import org.seckill.entity.Seckill;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by SliverZhang on 2017/10/31.
 */

public interface SeckillDao {
    int reduceNumber(@Param("seckillId") long seckillId,@Param("killTime") Date killTime);

    Seckill queryById(long seckillId);

    List<Seckill> queryAll(@Param("offet") int offet,@Param("limit") int limit);

//    List<Seckill> queryAll( int offet, int limit);
    /*
        使用存储过程执行秒杀
        @Param
     */
    void killByProcedure(Map<String,Object> paramMap);
}
